package com.dins.elashutina;

import com.dins.elashutina.DBHandler.Filler;
import com.dins.elashutina.filter.Filter;
import com.dins.elashutina.parser.BullsEyeParser;
import com.dins.elashutina.parser.CoberturaParser;
import com.dins.elashutina.parser.JaCoCoParser;
import com.dins.elashutina.parser.Tree;
import com.dins.elashutina.reporter.Reporter;

import java.io.File;

public class Main {

    public static void main(String[] args) {
        //Filter.getSubtree(CoberturaParser.startCoberturaParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\coverage.xml"), new Tree(Tree.Type.COBERTURA)), 1);

//        if (args[0].equals("cobertura")) {
//            if (args[1].equals("summary")) {
       //Reporter.coberturaReport(CoberturaParser.startCoberturaParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\coverage.xml"), new Tree(Tree.Type.COBERTURA)));
        Reporter.jaCoCoReport(JaCoCoParser.startJaCoCoParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\jacoco.xml"), new Tree(Tree.Type.JACOCO)));
        //JaCoCoParser.startJaCoCoParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\jacoco.xml"), new Tree(Tree.Type.JACOCO));
//            }
//        }
//        if (args[0].equals("bullseye")) {
//            if (args[1].equals("summary")) {
        //Reporter.bullseyeReport(BullsEyeParser.startBullsEyeParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\bullseye2.xml"), new Tree(Tree.Type.BULLSEYE)));
//            }
//        }
//        Filter.diff(CoberturaParser.startCoberturaParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\coverage44.xml"), new Tree(Tree.Type.COBERTURA)),
//                CoberturaParser.startCoberturaParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\coverage41.xml"), new Tree(Tree.Type.COBERTURA)));
//        //Connector.connect();
     //   Filler.createTables();
     // Filler.addToDB(CoberturaParser.startCoberturaParser(new File("C:\\Users\\ekaterina.lashutina\\Desktop\\coverage.xml"), new Tree(Tree.Type.COBERTURA)),"test_build2","test_test2");
    }
}
